//==============================================================================
//
//               Copyright (C) 2002  Dick van Oudheusden
//  
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
//==============================================================================
// 
//  $Date: 2003-10-31 08:12:35 $ $Revision: 1.1 $
//
//==============================================================================

#include <stdlib.h>

#include "ofc/config.h"

#include "ofc/DMD5.h"
#include "ofc/DText.h"

#include "DInc.h"
#include "DTest.h"

//-Wrappers--------------------------------------------------------------------

void DMD5_test(void)
{
  DMD5 *md5 = [DMD5 alloc];
     
  STARTTEST();

  [md5 init :"Hello"];
  
  TEST([[md5 hexdigest] ccompare :"8b1a9953c4611296a827abf8c47804d7"] == 0);
    
  [md5 update :" "];

  TEST([[md5 hexdigest] ccompare :"d1a7fb5eab1c16cb4f7cf341cf188c3d"] == 0);

  [md5 free];

  STOPTEST();
}

